/*
 * @#(ProviderV1ApiFallback.java)           2017/9/6
 *
 * Copyright (c) 2017. Hangzhou cloorc Technology Co. LTD
 * 369 Heshan Road, Hangzhou, Zhejiang, 310000, China.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information
 * of Hangzhou cloorc Technology Co. LTD ("Confidential Information").
 * You shall not disclose such Confidential Information and shall use
 * it only in accordance with the terms of the license agreement you
 * entered into with Hangzhou cloorc Technology Co. LTD.
 */

package com.cloorc.example.fallback.api;

import com.cloorc.example.clouds.api.ProviderV1Api;
import com.cloorc.example.clouds.api.WhereWho;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;

import java.util.Collections;
import java.util.List;

/**
 * First implementation on 20:25 星期三,九月 2017/9/6.
 *
 * @author : Z0228
 * @version : 1.0.0
 * @since : 1.8
 */
public class ProviderV1ApiFallback implements ProviderV1Api {

    public ResponseEntity<List<String>> hello(final WhereWho whereWho) {
        return new ResponseEntity<>(Collections.singletonList("{\"msg\":\"" + whereWho.getWho().getName() + "\"}"), HttpStatus.OK);
    }
}
